package com.zheng.study.company.entity;

import com.zheng.study.base.bean.BaseEnumManager;

import javax.persistence.*;
import java.util.Date;

/**
 * 实体类 - 用户
 * ============================================================================
 * author : dzw
 * createDate:  2018/8/16 。
 * ============================================================================
 */
//@Entity
//@Table(name = "sys_user")
public class User extends CompanyEntity {
	private static final long serialVersionUID = -4994022459153966020L;

	/**
	 * 账号信息
	 */
	private String adminId;

	/**
	 * 主要职责
	 */
	private Duty mainDuty;

	// ====================个人资料 ====================

	/**
	 * 性别
	 */
	private BaseEnumManager.SexEnum sex;

	/**
	 * 生日
	 */
	private Date birthday;

	/**
	 * 头像
	 */
	private String headFileId;

	/**
	 * 身份证号
	 */
	private String cardId;

	/**
	 * 省
	 */
	private String province;

	/**
	 * 市
	 */
	private String city;

	/**
	 * 区
	 */
	private String county;



	public String getAdminId() {
		return adminId;
	}

	public void setAdminId(String adminId) {
		this.adminId = adminId;
	}

	@Enumerated(EnumType.STRING)
	public BaseEnumManager.SexEnum getSex() {
		return sex;
	}

	public void setSex(BaseEnumManager.SexEnum sex) {
		this.sex = sex;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	public Duty getMainDuty() {
		return mainDuty;
	}

	public void setMainDuty(Duty mainDuty) {
		this.mainDuty = mainDuty;
	}

	public Date getBirthday() {
		return birthday;
	}

	public void setBirthday(Date birthday) {
		this.birthday = birthday;
	}

	public String getHeadFileId() {
		return headFileId;
	}

	public void setHeadFileId(String headFileId) {
		this.headFileId = headFileId;
	}

	public String getCardId() {
		return cardId;
	}

	public void setCardId(String cardId) {
		this.cardId = cardId;
	}

	public String getProvince() {
		return province;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getCounty() {
		return county;
	}

	public void setCounty(String county) {
		this.county = county;
	}
}
